﻿using System;
using System.Collections;
using System.Xml;
using System.Xml.Schema;
using InfoJetSoft.Service.Entity;
using InfoJetSoft.Service.Util;

namespace InfoJetSoft.Service.Worker
{
	//验证整个文档，并记录无效Node的JetId，用于在客户端显示无效标记。
	class FormRunSchemaValidationWorker
	{
		
		//验证整个文档，并记录无效Node的JetId。
		public static void  runSchemaValidation(Form form)
		{
			SchemaValidation validation = new SchemaValidation( form );
			validation.Validate();
			//记录无效Node的JetId.
			form.FieldErrorList.AddRange( validation.GetSchemaErrorList() );
		}

	}
}